#pragma once

#include "Common/common.h"
#include "DuiLib/UIlib.h"

namespace DuiLib {

class MainWnd : public WndCommon {
public:
    MainWnd() {}

    ~MainWnd() {}

    virtual UINT GetIconID() override
    {
        return IDI_ICON1;
    }

    virtual CDuiString GetTitleText() override
    {
        return _T("Spy4Win Pro");
    }

    void OnMouseMove(TNotifyUI& msg);
    void OnButtonUp(TNotifyUI& msg);
    void OnOptSelect(TNotifyUI& msg);

    DUI_DECLARE_MESSAGE_MAP()

private:
    void UpdateGeneralInfo();
    void UpdateProcessInfo();

private:
    HWND m_hWndCurrent = NULL;
    CONTROL_BIND(CEditUI, m_editWndClass, _T("wnd_class"));
    CONTROL_BIND(CEditUI, m_editWndTitle, _T("wnd_title"));
    CONTROL_BIND(CEditUI, m_editWndHwnd, _T("wnd_hwnd"));
    CONTROL_BIND(CEditUI, m_editWndRect, _T("wnd_rect"));
    CONTROL_BIND(CEditUI, m_editWndStyle, _T("wnd_style"));
    CONTROL_BIND(CEditUI, m_editWndStyleEx, _T("wnd_styleex"));
    CONTROL_BIND(CEditUI, m_editWndInst, _T("wnd_instance"));
    CONTROL_BIND(CEditUI, m_editWndProc, _T("wnd_proc"));
    CONTROL_BIND(CEditUI, m_editWndId, _T("wnd_id"));
    CONTROL_BIND(CEditUI, m_editWndUserData, _T("wnd_userdata"));
    CONTROL_BIND(CEditUI, m_editWndParent, _T("wnd_parent"));
    CONTROL_BIND(CEditUI, m_editPid, _T("process_id"));
    CONTROL_BIND(CEditUI, m_editTid, _T("process_tid"));
    CONTROL_BIND(CEditUI, m_editProcessPath, _T("process_path"));
    CONTROL_BIND(CEditUI, m_editCmdLine, _T("process_cmdline"));
};

} // namespace DuiLib